package cn.sh.org.domain;

import cn.sh.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * 表的实体类
 */
@Data//自动生成get和set方法
@ToString
public class Department extends BaseDomain {

    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Long parent_id;
    private Long shop_id;

    //部门负责人
    private Employee manager;
    //上级部门
    private Department parent;
    /*自己的子部门*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)/*如果集合为空 就不转化成json字符串返给前端*/
    private List<Department> children = new ArrayList<>();
}
